library(plotly)
## Loading required package: ggplot2
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
data(iris)
plot_ly(x= iris$Sepal.Width, y= iris$Sepal.Length, z = iris$Species,
type = "scatter3d", mode = "markers", color = iris$Species)